package com.mycompany.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.mycompany.entity.Bill;
import com.mycompany.repository.BillDao;
import com.mycompany.service.BillService;

@Service
public class BillServiceImpl implements BillService {
	
	@Autowired
	private BillDao billDao;

	@Override
	@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
	public void persist(Bill bill) {
		billDao.persist(bill);
	}

	@Override
	@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
	public void merge(Bill bill) {
		billDao.merge(bill);
	}

	@Override
	@Transactional(propagation = Propagation.REQUIRED, readOnly = false)
	public void remove(Bill bill) {
		billDao.remove(bill);
	}

	@Override
	public Bill findById(Integer billId) {
		return billDao.findById(billId);
	}

	@Override
	public Bill find(Bill bill) {
		return billDao.find(bill);
	}

	@Override
	public List<Bill> findAll() {
		return billDao.findAll();
	}

	@Override
	public List<Bill> findListByCodition(Bill bill) {
		return billDao.findListByCodition(bill);
	}

}
